[XEN][POWERPC] Keepin it cool: sleep the processor when halt fails
authorJimi Xenidis <jimix@watson.ibm.com>
Wed, 4 Oct 2006 18:06:14 +0000 (14:06 -0400)
committerJimi Xenidis <jimix@watson.ibm.com>
Wed, 4 Oct 2006 18:06:14 +0000 (14:06 -0400)
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
--HG--
extra : transplant_source : p%1Ch%92%1F%F3%23p%CA%EA%AA%C1z%5E%0A%25%EB%C8%A8%3A

xen/arch/powerpc/domain.c
xen/arch/powerpc/exceptions.h
xen/arch/powerpc/setup.c

index 83a649c4d6a7f29e098a20ce3d0bcb69fd2ad990..7d69f72fe9c34a522d03dfac61c21975de474af1 100644 (file)
@@ -34,6 +34,7 @@
 #include <asm/current.h>
 #include <asm/hcalls.h>
 #include "rtas.h"
+#include "exceptions.h"
 
 #define next_arg(fmt, args) ({                                              \
     unsigned long __arg;                                                    \
@@ -47,7 +48,6 @@
     }                                                                       \
     __arg;                                                                  \
 })
-extern void idle_loop(void);
 
 unsigned long hypercall_create_continuation(unsigned int op,
         const char *format, ...)
@@ -99,7 +99,8 @@ void arch_domain_destroy(struct domain *d)
 static void machine_fail(const char *s)
 {
     printf("%s failed, manual powercycle required!\n", s);
-    while(1);
+    for (;;)
+        sleep();
 }
 
 void machine_halt(void)
@@ -302,7 +303,6 @@ void arch_dump_vcpu_info(struct vcpu *v)
 {
 }
 
-extern void sleep(void);
 static void safe_halt(void)
 {
     int cpu = smp_processor_id();
index 8320f4f19b5e7638addd8bcdcfd50ae7732982ea..0ec2e76ec087f5db8ca11ac6256f2b4be905b119 100644 (file)
@@ -43,8 +43,11 @@ extern void program_exception(
     struct cpu_user_regs *regs, unsigned long cookie);
 
 extern long xen_hvcall_jump(struct cpu_user_regs *regs, ulong address);
+
 extern void *mambo_memset(void *, int, ulong);
 extern void *mambo_memcpy(void *, const void *, ulong);
+extern void sleep(void);
+extern void idle_loop(void);
 
 extern ulong *__hypercall_table[];
 
index bfa59ca48113e6079673055f098630cf958bf2f6..31f7a7d694d10c12626da6283d10968152e3f30e 100644 (file)
@@ -196,8 +196,6 @@ static void __init start_of_day(void)
     schedulers_start();
 }
 
-extern void idle_loop(void);
-
 void startup_cpu_idle_loop(void)
 {
     struct vcpu *v = current;